package com.cjm.one.goods.client;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cjm.one.common.constant.ServerConstants;
import com.cjm.one.common.result.Result;
import com.cjm.one.model.goods.vo.GoodsSkuBrowseHistoryVo;
import com.cjm.one.model.goods.vo.GoodsSkuVo;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(value = ServerConstants.SERVER_ONE_GOODS)
public interface GoodsBrowseHistoryClient {
    @GetMapping("/app/goods/browse/history/add")
    @Operation(summary = "添加商品浏览历史")
    Result<Boolean> add(@RequestParam("skuId") Long skuId);

    @DeleteMapping("/app/goods/browse/history/deleteBatch")
    @Operation(summary = "删除商品浏览历史")
    Result<Boolean> deleteBatch(@RequestParam("ids") Long[] ids);

    @GetMapping("/app/goods/browse/history/list")
    @Operation(summary = "查询商品浏览历史")
    Result<Page<GoodsSkuVo>> list(@RequestParam("current") Integer current,
                                  @RequestParam("size") Integer size);
}
